import lightgbm as lgb
from preprocess_0 import preprocess
import pandas as pd
train_data_path = r'datasets/train.csv'
test_data_path = r'datasets/test1.csv'
train_data,label,_ = preprocess(train_data_path)
test_data,_,test_sid = preprocess(test_data_path)



model = lgb.LGBMClassifier(num_leaves=2**5-1, reg_alpha=0.25, reg_lambda=0.25, objective='binary',
            max_depth=-1, learning_rate=0.005, min_child_samples=3, random_state=2021,
            n_estimators=10000, subsample=1, colsample_bytree=1,
)
# 模型训练

model.fit(train_data.drop([ 'version','osv','lan'], axis=1), label)
result = model.predict(test_data.drop([ 'version','osv','lan'], axis=1))
print(result)
res = pd.DataFrame(test_sid)
res['label'] = result
res.to_csv('result/baseline_osv_screen_1.csv',index=False)
print(res)